//
//  NYMyClassesView.m
//  NiuWaJiaoYu
//
//  Created by MinLison on 2018/1/7.
//  Copyright © 2018年 niuwaketang. All rights reserved.
//

#import "NYMyClassesView.h"

@implementation NYMyClassesView
- (void)setContentView:(UIView *)contentView
{
        _contentView = contentView;
        [self setupView];
}
- (void)setupView
{
        [super setupView];
        self.backgroundColor = UIColorForBackground;
        if (!self.contentView)
        {
                return;
        }
        [self addSubview:self.contentView];
        [self.contentView mas_remakeConstraints:^(MASConstraintMaker *make) {
                
                if (@available(iOS 11.0,*))
                {
                        make.bottom.equalTo(self.mas_safeAreaLayoutGuideBottom);
                        make.top.equalTo(self.mas_safeAreaLayoutGuideTop);
                        make.left.equalTo(self.mas_safeAreaLayoutGuideLeft);
                        make.right.equalTo(self.mas_safeAreaLayoutGuideRight);
                }
                else
                {
                        make.bottom.equalTo(self.controller.mas_bottomLayoutGuideTop);
                        make.top.equalTo(self.controller.mas_topLayoutGuideBottom);
                        make.left.right.equalTo(self);
                }
        }];
}
@end
